package com.etc.service.impl;

import com.etc.dao.AddressMapper;
import com.etc.entity.Address;
import com.etc.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    AddressMapper dao;


    @Override
    public List<Address> selectByPrimaryKey(String userId){
        return dao.selectByPrimaryKey(userId);
    }

    @Override
    public boolean insert(Address record) {
        int i = dao.insert(record);
        return i>0;
    }
}
